Complex software applications typically include hundreds or even thousands of subroutines or functions. Each of the subroutines typically performs a particular function or set of functions. The subroutines of the software application communicate with one another by calling one another in a variety of distinct calling paths. A call path is a communication path between two or more subroutines. Oftentimes, applications can include redundant function calls.
When a redundant or duplicate function call occurs in a running program, a task is performed that was performed previously by the first function call. Frequently, it happens that each of the duplicate calls is unnecessary, because the task only needed to be performed one time. One reason that a duplicate call is unnecessary is that the called function is “pure” and is called more than once with the same input arguments. A function is said to be “pure” if the result computed by and returned by it, either as a return value or through an out parameter, is dependent solely on the input arguments, and further the function does not change any global state. Moreover, redundant function calls uselessly add to the expense of a method, such as by increasing time requirements and/or by consuming memory and CPU capacity.